Identify Locked users in a module

All,
I would like to get the list of users who is working / locked the below mentioned module & put that users in a array.

We required this module for another dxl program that will be running automatically, if the module is locked... We can send a email to the users with the list of users working on the module.

I am getting the error when I print. Can some one help?

Skip lockedUser = createString
string SelectedUsers
string lockedUsers
string moduleList[] = {"PD","SFS","Option"}
moduleList[0] = "/Test/04. Contract Documents/PD"
moduleList[1] = "/Test/05. SystemRequirements/System Functional Specification"
moduleList[2] = "/Test/03. Functional Options/Requirements List"
for i in 0:2 do
{
ModName_ modRead = module(moduleList[i])
//print moduleList[i]"\n"
Lock lockItem
LockList lcklist = getLocksInModule(modRead,true)
for lockItem in lcklist do
{
string username = lockItem.user
put(lockedUser,username,lockItem)
}
int Count = 0
lockItem = null
for lockItem in lockedUser do
{
Count++

}
string SelectedUsersCount
Count = 0
for lockItem in lockedUser do
{
SelectedUsersCount++= (string key(lockedUser))

// Error -E- DXL: <Line:35> incorrect arguments for function (print)
print SelectedUsers
}
}
SystemAdmin - Wed Oct 28 08:25:41 EDT 2009

Re: Identify Locked users in a module
ePiallat - Wed Oct 28 08:37:40 EDT 2009

Hi,
You really should use the {code} markers around your code.

But from what I can see, it seems you try to print an array of string. First simply try to replace:

for lockItem in lockedUser do
{
   SelectedUsers[Count++]= (string key(lockedUser))
 
   // Error -E- DXL: <Line:35> incorrect arguments for function (print)
   print SelectedUsers
}


by:

 

for lockItem in lockedUser do
{
   SelectedUsers[Count++]= (string key(lockedUser))
 
   // No more error: correct argument for function (print)
   print SelectedUsers[Count-1] "\n"
}

 

Re: Identify Locked users in a module
SystemAdmin - Wed Oct 28 10:54:32 EDT 2009

Thanks... worked.